package com.bkgrands.fpmu.activities;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.bkgrands.fpmu.R;
import com.squareup.picasso.Picasso;

import static com.bkgrands.fpmu.Adapters.ProgressAdapter.EXTRA_CAP;
import static com.bkgrands.fpmu.Adapters.ProgressAdapter.EXTRA_IMG;


public class ProgressDetailsActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_progress_details);

        Intent intent = getIntent();
        String imageUrl = intent.getStringExtra(EXTRA_IMG);
        String caption = intent.getStringExtra(EXTRA_CAP);

        ImageView imageView = findViewById(R.id.image_view_detail);
        TextView textViewCreator = findViewById(R.id.text_view_caption);

        Picasso.get().load(imageUrl).fit().centerInside().into(imageView);
        textViewCreator.setText(caption);

    }
}
